import random
import pandas as pd

# with open('col2', 'w') as fh:
#     fh.write('time' + ','+'entity1'+','+'entity2'+','+'relation_type'+','+'uid'+','+'gid'+','+'inode'+','+'pid'+'\n')
#     for i in range(24 * 60 * 60):
#         fh.write('2020-0'+str(random.randrange(1, 10))+'-'+str(random.randrange(10, 28))+' ')
#         fh.write(str(random.randrange(10, 23))+':'+str(random.randrange(10, 59))+':'+str(random.randrange(10, 59))+',')
#         fh.write('p'+str(random.randrange(1, 50)) + ',')
#         fh.write('u'+str(random.randrange(1, 10)) + ',')
#         fh.write(str(random.randrange(1, 5)) + ',')
#         fh.write(str(random.randrange(1, 66535)) + ',')
#         fh.write(str(random.randrange(1, 66535)) + ',')
#         fh.write(str(random.randrange(1, 66535)) + ',')
#         fh.write(str(random.randrange(1, 66535)) + '\n')

df = pd.read_csv('col2', index_col='time')
df = df.sort_index()
# print(df)
# print(df.describe())
# print(df['uid'])
# print(df.loc['2020-01-19 21:14:48'])
print(df.iloc[1])

